package com.wangzhen.spring.ioc.lifecycle.beandefinition;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

public class XMLBeanDefinitionReaderDemo {

    public static void main(String[] args) {
        DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);
        int beanDefinitionCount = reader.loadBeanDefinitions("classpath:META-INF/dependcy-lookup-context.xml");
        System.out.println("通过xml方式加载的beandefinition count=" + beanDefinitionCount);

    }
}
